/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
import * as $protobuf from "protobufjs/minimal.js";
import Long from 'long';
$protobuf.default.util.Long = Long;
$protobuf.default.configure();

const $Reader = $protobuf.default.Reader, $Writer = $protobuf.default.Writer, $util = $protobuf.default.util;

const $root = {};

export const Game = $root.Game = (() => {

    const Game = {};

    Game.p_true_sync_v3 = (function() {

        function p_true_sync_v3(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        p_true_sync_v3.prototype.x = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
        p_true_sync_v3.prototype.y = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
        p_true_sync_v3.prototype.z = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        p_true_sync_v3.create = function create(properties) {
            return new p_true_sync_v3(properties);
        };

        p_true_sync_v3.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.x != null && Object.hasOwnProperty.call(m, "x"))
                w.uint32(9).fixed64(m.x);
            if (m.y != null && Object.hasOwnProperty.call(m, "y"))
                w.uint32(17).fixed64(m.y);
            if (m.z != null && Object.hasOwnProperty.call(m, "z"))
                w.uint32(25).fixed64(m.z);
            return w;
        };

        p_true_sync_v3.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.p_true_sync_v3();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.x = r.fixed64();
                    break;
                case 2:
                    m.y = r.fixed64();
                    break;
                case 3:
                    m.z = r.fixed64();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        p_true_sync_v3.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.p_true_sync_v3)
                return d;
            var m = new $root.Game.p_true_sync_v3();
            if (d.x != null) {
                if ($util.Long)
                    (m.x = $util.Long.fromValue(d.x)).unsigned = false;
                else if (typeof d.x === "string")
                    m.x = parseInt(d.x, 10);
                else if (typeof d.x === "number")
                    m.x = d.x;
                else if (typeof d.x === "object")
                    m.x = new $util.LongBits(d.x.low >>> 0, d.x.high >>> 0).toNumber();
            }
            if (d.y != null) {
                if ($util.Long)
                    (m.y = $util.Long.fromValue(d.y)).unsigned = false;
                else if (typeof d.y === "string")
                    m.y = parseInt(d.y, 10);
                else if (typeof d.y === "number")
                    m.y = d.y;
                else if (typeof d.y === "object")
                    m.y = new $util.LongBits(d.y.low >>> 0, d.y.high >>> 0).toNumber();
            }
            if (d.z != null) {
                if ($util.Long)
                    (m.z = $util.Long.fromValue(d.z)).unsigned = false;
                else if (typeof d.z === "string")
                    m.z = parseInt(d.z, 10);
                else if (typeof d.z === "number")
                    m.z = d.z;
                else if (typeof d.z === "object")
                    m.z = new $util.LongBits(d.z.low >>> 0, d.z.high >>> 0).toNumber();
            }
            return m;
        };

        p_true_sync_v3.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.x = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.x = o.longs === String ? "0" : 0;
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.y = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.y = o.longs === String ? "0" : 0;
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.z = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.z = o.longs === String ? "0" : 0;
            }
            if (m.x != null && m.hasOwnProperty("x")) {
                if (typeof m.x === "number")
                    d.x = o.longs === String ? String(m.x) : m.x;
                else
                    d.x = o.longs === String ? $util.Long.prototype.toString.call(m.x) : o.longs === Number ? new $util.LongBits(m.x.low >>> 0, m.x.high >>> 0).toNumber() : m.x;
            }
            if (m.y != null && m.hasOwnProperty("y")) {
                if (typeof m.y === "number")
                    d.y = o.longs === String ? String(m.y) : m.y;
                else
                    d.y = o.longs === String ? $util.Long.prototype.toString.call(m.y) : o.longs === Number ? new $util.LongBits(m.y.low >>> 0, m.y.high >>> 0).toNumber() : m.y;
            }
            if (m.z != null && m.hasOwnProperty("z")) {
                if (typeof m.z === "number")
                    d.z = o.longs === String ? String(m.z) : m.z;
                else
                    d.z = o.longs === String ? $util.Long.prototype.toString.call(m.z) : o.longs === Number ? new $util.LongBits(m.z.low >>> 0, m.z.high >>> 0).toNumber() : m.z;
            }
            return d;
        };

        p_true_sync_v3.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return p_true_sync_v3;
    })();

    Game.p_true_sync_quaternion = (function() {

        function p_true_sync_quaternion(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        p_true_sync_quaternion.prototype.x = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
        p_true_sync_quaternion.prototype.y = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
        p_true_sync_quaternion.prototype.z = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
        p_true_sync_quaternion.prototype.w = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        p_true_sync_quaternion.create = function create(properties) {
            return new p_true_sync_quaternion(properties);
        };

        p_true_sync_quaternion.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.x != null && Object.hasOwnProperty.call(m, "x"))
                w.uint32(9).fixed64(m.x);
            if (m.y != null && Object.hasOwnProperty.call(m, "y"))
                w.uint32(17).fixed64(m.y);
            if (m.z != null && Object.hasOwnProperty.call(m, "z"))
                w.uint32(25).fixed64(m.z);
            if (m.w != null && Object.hasOwnProperty.call(m, "w"))
                w.uint32(33).fixed64(m.w);
            return w;
        };

        p_true_sync_quaternion.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.p_true_sync_quaternion();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.x = r.fixed64();
                    break;
                case 2:
                    m.y = r.fixed64();
                    break;
                case 3:
                    m.z = r.fixed64();
                    break;
                case 4:
                    m.w = r.fixed64();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        p_true_sync_quaternion.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.p_true_sync_quaternion)
                return d;
            var m = new $root.Game.p_true_sync_quaternion();
            if (d.x != null) {
                if ($util.Long)
                    (m.x = $util.Long.fromValue(d.x)).unsigned = false;
                else if (typeof d.x === "string")
                    m.x = parseInt(d.x, 10);
                else if (typeof d.x === "number")
                    m.x = d.x;
                else if (typeof d.x === "object")
                    m.x = new $util.LongBits(d.x.low >>> 0, d.x.high >>> 0).toNumber();
            }
            if (d.y != null) {
                if ($util.Long)
                    (m.y = $util.Long.fromValue(d.y)).unsigned = false;
                else if (typeof d.y === "string")
                    m.y = parseInt(d.y, 10);
                else if (typeof d.y === "number")
                    m.y = d.y;
                else if (typeof d.y === "object")
                    m.y = new $util.LongBits(d.y.low >>> 0, d.y.high >>> 0).toNumber();
            }
            if (d.z != null) {
                if ($util.Long)
                    (m.z = $util.Long.fromValue(d.z)).unsigned = false;
                else if (typeof d.z === "string")
                    m.z = parseInt(d.z, 10);
                else if (typeof d.z === "number")
                    m.z = d.z;
                else if (typeof d.z === "object")
                    m.z = new $util.LongBits(d.z.low >>> 0, d.z.high >>> 0).toNumber();
            }
            if (d.w != null) {
                if ($util.Long)
                    (m.w = $util.Long.fromValue(d.w)).unsigned = false;
                else if (typeof d.w === "string")
                    m.w = parseInt(d.w, 10);
                else if (typeof d.w === "number")
                    m.w = d.w;
                else if (typeof d.w === "object")
                    m.w = new $util.LongBits(d.w.low >>> 0, d.w.high >>> 0).toNumber();
            }
            return m;
        };

        p_true_sync_quaternion.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.x = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.x = o.longs === String ? "0" : 0;
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.y = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.y = o.longs === String ? "0" : 0;
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.z = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.z = o.longs === String ? "0" : 0;
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.w = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.w = o.longs === String ? "0" : 0;
            }
            if (m.x != null && m.hasOwnProperty("x")) {
                if (typeof m.x === "number")
                    d.x = o.longs === String ? String(m.x) : m.x;
                else
                    d.x = o.longs === String ? $util.Long.prototype.toString.call(m.x) : o.longs === Number ? new $util.LongBits(m.x.low >>> 0, m.x.high >>> 0).toNumber() : m.x;
            }
            if (m.y != null && m.hasOwnProperty("y")) {
                if (typeof m.y === "number")
                    d.y = o.longs === String ? String(m.y) : m.y;
                else
                    d.y = o.longs === String ? $util.Long.prototype.toString.call(m.y) : o.longs === Number ? new $util.LongBits(m.y.low >>> 0, m.y.high >>> 0).toNumber() : m.y;
            }
            if (m.z != null && m.hasOwnProperty("z")) {
                if (typeof m.z === "number")
                    d.z = o.longs === String ? String(m.z) : m.z;
                else
                    d.z = o.longs === String ? $util.Long.prototype.toString.call(m.z) : o.longs === Number ? new $util.LongBits(m.z.low >>> 0, m.z.high >>> 0).toNumber() : m.z;
            }
            if (m.w != null && m.hasOwnProperty("w")) {
                if (typeof m.w === "number")
                    d.w = o.longs === String ? String(m.w) : m.w;
                else
                    d.w = o.longs === String ? $util.Long.prototype.toString.call(m.w) : o.longs === Number ? new $util.LongBits(m.w.low >>> 0, m.w.high >>> 0).toNumber() : m.w;
            }
            return d;
        };

        p_true_sync_quaternion.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return p_true_sync_quaternion;
    })();

    Game.p_lock_step_unit_info = (function() {

        function p_lock_step_unit_info(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        p_lock_step_unit_info.prototype.roleId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
        p_lock_step_unit_info.prototype.name = "";
        p_lock_step_unit_info.prototype.position = null;
        p_lock_step_unit_info.prototype.rotation = null;

        p_lock_step_unit_info.create = function create(properties) {
            return new p_lock_step_unit_info(properties);
        };

        p_lock_step_unit_info.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.roleId != null && Object.hasOwnProperty.call(m, "roleId"))
                w.uint32(8).uint64(m.roleId);
            if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                w.uint32(18).string(m.name);
            if (m.position != null && Object.hasOwnProperty.call(m, "position"))
                $root.Game.p_true_sync_v3.encode(m.position, w.uint32(26).fork()).ldelim();
            if (m.rotation != null && Object.hasOwnProperty.call(m, "rotation"))
                $root.Game.p_true_sync_quaternion.encode(m.rotation, w.uint32(34).fork()).ldelim();
            return w;
        };

        p_lock_step_unit_info.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.p_lock_step_unit_info();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.roleId = r.uint64();
                    break;
                case 2:
                    m.name = r.string();
                    break;
                case 3:
                    m.position = $root.Game.p_true_sync_v3.decode(r, r.uint32());
                    break;
                case 4:
                    m.rotation = $root.Game.p_true_sync_quaternion.decode(r, r.uint32());
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        p_lock_step_unit_info.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.p_lock_step_unit_info)
                return d;
            var m = new $root.Game.p_lock_step_unit_info();
            if (d.roleId != null) {
                if ($util.Long)
                    (m.roleId = $util.Long.fromValue(d.roleId)).unsigned = true;
                else if (typeof d.roleId === "string")
                    m.roleId = parseInt(d.roleId, 10);
                else if (typeof d.roleId === "number")
                    m.roleId = d.roleId;
                else if (typeof d.roleId === "object")
                    m.roleId = new $util.LongBits(d.roleId.low >>> 0, d.roleId.high >>> 0).toNumber(true);
            }
            if (d.name != null) {
                m.name = String(d.name);
            }
            if (d.position != null) {
                if (typeof d.position !== "object")
                    throw TypeError(".Game.p_lock_step_unit_info.position: object expected");
                m.position = $root.Game.p_true_sync_v3.fromObject(d.position);
            }
            if (d.rotation != null) {
                if (typeof d.rotation !== "object")
                    throw TypeError(".Game.p_lock_step_unit_info.rotation: object expected");
                m.rotation = $root.Game.p_true_sync_quaternion.fromObject(d.rotation);
            }
            return m;
        };

        p_lock_step_unit_info.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                if ($util.Long) {
                    var n = new $util.Long(0, 0, true);
                    d.roleId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.roleId = o.longs === String ? "0" : 0;
                d.name = "";
                d.position = null;
                d.rotation = null;
            }
            if (m.roleId != null && m.hasOwnProperty("roleId")) {
                if (typeof m.roleId === "number")
                    d.roleId = o.longs === String ? String(m.roleId) : m.roleId;
                else
                    d.roleId = o.longs === String ? $util.Long.prototype.toString.call(m.roleId) : o.longs === Number ? new $util.LongBits(m.roleId.low >>> 0, m.roleId.high >>> 0).toNumber(true) : m.roleId;
            }
            if (m.name != null && m.hasOwnProperty("name")) {
                d.name = m.name;
            }
            if (m.position != null && m.hasOwnProperty("position")) {
                d.position = $root.Game.p_true_sync_v3.toObject(m.position, o);
            }
            if (m.rotation != null && m.hasOwnProperty("rotation")) {
                d.rotation = $root.Game.p_true_sync_quaternion.toObject(m.rotation, o);
            }
            return d;
        };

        p_lock_step_unit_info.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return p_lock_step_unit_info;
    })();

    Game.p_ls_input_param = (function() {

        function p_ls_input_param(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        p_ls_input_param.prototype.position = null;
        p_ls_input_param.prototype.button = 0;

        p_ls_input_param.create = function create(properties) {
            return new p_ls_input_param(properties);
        };

        p_ls_input_param.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.position != null && Object.hasOwnProperty.call(m, "position"))
                $root.Game.p_true_sync_v3.encode(m.position, w.uint32(10).fork()).ldelim();
            if (m.button != null && Object.hasOwnProperty.call(m, "button"))
                w.uint32(16).int32(m.button);
            return w;
        };

        p_ls_input_param.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.p_ls_input_param();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.position = $root.Game.p_true_sync_v3.decode(r, r.uint32());
                    break;
                case 2:
                    m.button = r.int32();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        p_ls_input_param.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.p_ls_input_param)
                return d;
            var m = new $root.Game.p_ls_input_param();
            if (d.position != null) {
                if (typeof d.position !== "object")
                    throw TypeError(".Game.p_ls_input_param.position: object expected");
                m.position = $root.Game.p_true_sync_v3.fromObject(d.position);
            }
            if (d.button != null) {
                m.button = d.button | 0;
            }
            return m;
        };

        p_ls_input_param.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                d.position = null;
                d.button = 0;
            }
            if (m.position != null && m.hasOwnProperty("position")) {
                d.position = $root.Game.p_true_sync_v3.toObject(m.position, o);
            }
            if (m.button != null && m.hasOwnProperty("button")) {
                d.button = m.button;
            }
            return d;
        };

        p_ls_input_param.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return p_ls_input_param;
    })();

    Game.p_ls_input = (function() {

        function p_ls_input(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        p_ls_input.prototype.type = 0;
        p_ls_input.prototype.parameters = null;

        p_ls_input.create = function create(properties) {
            return new p_ls_input(properties);
        };

        p_ls_input.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                w.uint32(8).int32(m.type);
            if (m.parameters != null && Object.hasOwnProperty.call(m, "parameters"))
                $root.Game.p_ls_input_param.encode(m.parameters, w.uint32(18).fork()).ldelim();
            return w;
        };

        p_ls_input.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.p_ls_input();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.type = r.int32();
                    break;
                case 2:
                    m.parameters = $root.Game.p_ls_input_param.decode(r, r.uint32());
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        p_ls_input.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.p_ls_input)
                return d;
            var m = new $root.Game.p_ls_input();
            if (d.type != null) {
                m.type = d.type | 0;
            }
            if (d.parameters != null) {
                if (typeof d.parameters !== "object")
                    throw TypeError(".Game.p_ls_input.parameters: object expected");
                m.parameters = $root.Game.p_ls_input_param.fromObject(d.parameters);
            }
            return m;
        };

        p_ls_input.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                d.type = 0;
                d.parameters = null;
            }
            if (m.type != null && m.hasOwnProperty("type")) {
                d.type = m.type;
            }
            if (m.parameters != null && m.hasOwnProperty("parameters")) {
                d.parameters = $root.Game.p_ls_input_param.toObject(m.parameters, o);
            }
            return d;
        };

        p_ls_input.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return p_ls_input;
    })();

    Game.p_one_frame_input = (function() {

        function p_one_frame_input(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        p_one_frame_input.prototype.roleId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
        p_one_frame_input.prototype.input = null;

        p_one_frame_input.create = function create(properties) {
            return new p_one_frame_input(properties);
        };

        p_one_frame_input.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.roleId != null && Object.hasOwnProperty.call(m, "roleId"))
                w.uint32(8).uint64(m.roleId);
            if (m.input != null && Object.hasOwnProperty.call(m, "input"))
                $root.Game.p_ls_input.encode(m.input, w.uint32(18).fork()).ldelim();
            return w;
        };

        p_one_frame_input.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.p_one_frame_input();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.roleId = r.uint64();
                    break;
                case 2:
                    m.input = $root.Game.p_ls_input.decode(r, r.uint32());
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        p_one_frame_input.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.p_one_frame_input)
                return d;
            var m = new $root.Game.p_one_frame_input();
            if (d.roleId != null) {
                if ($util.Long)
                    (m.roleId = $util.Long.fromValue(d.roleId)).unsigned = true;
                else if (typeof d.roleId === "string")
                    m.roleId = parseInt(d.roleId, 10);
                else if (typeof d.roleId === "number")
                    m.roleId = d.roleId;
                else if (typeof d.roleId === "object")
                    m.roleId = new $util.LongBits(d.roleId.low >>> 0, d.roleId.high >>> 0).toNumber(true);
            }
            if (d.input != null) {
                if (typeof d.input !== "object")
                    throw TypeError(".Game.p_one_frame_input.input: object expected");
                m.input = $root.Game.p_ls_input.fromObject(d.input);
            }
            return m;
        };

        p_one_frame_input.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                if ($util.Long) {
                    var n = new $util.Long(0, 0, true);
                    d.roleId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.roleId = o.longs === String ? "0" : 0;
                d.input = null;
            }
            if (m.roleId != null && m.hasOwnProperty("roleId")) {
                if (typeof m.roleId === "number")
                    d.roleId = o.longs === String ? String(m.roleId) : m.roleId;
                else
                    d.roleId = o.longs === String ? $util.Long.prototype.toString.call(m.roleId) : o.longs === Number ? new $util.LongBits(m.roleId.low >>> 0, m.roleId.high >>> 0).toNumber(true) : m.roleId;
            }
            if (m.input != null && m.hasOwnProperty("input")) {
                d.input = $root.Game.p_ls_input.toObject(m.input, o);
            }
            return d;
        };

        p_one_frame_input.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return p_one_frame_input;
    })();

    Game.lock_step_match_c2s = (function() {

        function lock_step_match_c2s(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_match_c2s.create = function create(properties) {
            return new lock_step_match_c2s(properties);
        };

        lock_step_match_c2s.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            return w;
        };

        lock_step_match_c2s.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_match_c2s();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_match_c2s.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_match_c2s)
                return d;
            return new $root.Game.lock_step_match_c2s();
        };

        lock_step_match_c2s.toObject = function toObject() {
            return {};
        };

        lock_step_match_c2s.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_match_c2s;
    })();

    Game.lock_step_match_s2c = (function() {

        function lock_step_match_s2c(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_match_s2c.prototype.code = 0;

        lock_step_match_s2c.create = function create(properties) {
            return new lock_step_match_s2c(properties);
        };

        lock_step_match_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.code != null && Object.hasOwnProperty.call(m, "code"))
                w.uint32(8).uint32(m.code);
            return w;
        };

        lock_step_match_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_match_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.code = r.uint32();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_match_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_match_s2c)
                return d;
            var m = new $root.Game.lock_step_match_s2c();
            if (d.code != null) {
                m.code = d.code >>> 0;
            }
            return m;
        };

        lock_step_match_s2c.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                d.code = 0;
            }
            if (m.code != null && m.hasOwnProperty("code")) {
                d.code = m.code;
            }
            return d;
        };

        lock_step_match_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_match_s2c;
    })();

    Game.lock_step_match_success_s2c = (function() {

        function lock_step_match_success_s2c(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_match_success_s2c.prototype.matchId = 0;

        lock_step_match_success_s2c.create = function create(properties) {
            return new lock_step_match_success_s2c(properties);
        };

        lock_step_match_success_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.matchId != null && Object.hasOwnProperty.call(m, "matchId"))
                w.uint32(8).int32(m.matchId);
            return w;
        };

        lock_step_match_success_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_match_success_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.matchId = r.int32();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_match_success_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_match_success_s2c)
                return d;
            var m = new $root.Game.lock_step_match_success_s2c();
            if (d.matchId != null) {
                m.matchId = d.matchId | 0;
            }
            return m;
        };

        lock_step_match_success_s2c.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                d.matchId = 0;
            }
            if (m.matchId != null && m.hasOwnProperty("matchId")) {
                d.matchId = m.matchId;
            }
            return d;
        };

        lock_step_match_success_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_match_success_s2c;
    })();

    Game.lock_step_change_scene_finish_c2s = (function() {

        function lock_step_change_scene_finish_c2s(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_change_scene_finish_c2s.create = function create(properties) {
            return new lock_step_change_scene_finish_c2s(properties);
        };

        lock_step_change_scene_finish_c2s.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            return w;
        };

        lock_step_change_scene_finish_c2s.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_change_scene_finish_c2s();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_change_scene_finish_c2s.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_change_scene_finish_c2s)
                return d;
            return new $root.Game.lock_step_change_scene_finish_c2s();
        };

        lock_step_change_scene_finish_c2s.toObject = function toObject() {
            return {};
        };

        lock_step_change_scene_finish_c2s.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_change_scene_finish_c2s;
    })();

    Game.lock_step_fight_start_s2c = (function() {

        function lock_step_fight_start_s2c(p) {
            this.unitInfos = [];
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_fight_start_s2c.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
        lock_step_fight_start_s2c.prototype.randomSeed = 0;
        lock_step_fight_start_s2c.prototype.unitInfos = $util.emptyArray;

        lock_step_fight_start_s2c.create = function create(properties) {
            return new lock_step_fight_start_s2c(properties);
        };

        lock_step_fight_start_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.startTime != null && Object.hasOwnProperty.call(m, "startTime"))
                w.uint32(8).int64(m.startTime);
            if (m.randomSeed != null && Object.hasOwnProperty.call(m, "randomSeed"))
                w.uint32(16).int32(m.randomSeed);
            if (m.unitInfos != null && m.unitInfos.length) {
                for (var i = 0; i < m.unitInfos.length; ++i)
                    $root.Game.p_lock_step_unit_info.encode(m.unitInfos[i], w.uint32(26).fork()).ldelim();
            }
            return w;
        };

        lock_step_fight_start_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_fight_start_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.startTime = r.int64();
                    break;
                case 2:
                    m.randomSeed = r.int32();
                    break;
                case 3:
                    if (!(m.unitInfos && m.unitInfos.length))
                        m.unitInfos = [];
                    m.unitInfos.push($root.Game.p_lock_step_unit_info.decode(r, r.uint32()));
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_fight_start_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_fight_start_s2c)
                return d;
            var m = new $root.Game.lock_step_fight_start_s2c();
            if (d.startTime != null) {
                if ($util.Long)
                    (m.startTime = $util.Long.fromValue(d.startTime)).unsigned = false;
                else if (typeof d.startTime === "string")
                    m.startTime = parseInt(d.startTime, 10);
                else if (typeof d.startTime === "number")
                    m.startTime = d.startTime;
                else if (typeof d.startTime === "object")
                    m.startTime = new $util.LongBits(d.startTime.low >>> 0, d.startTime.high >>> 0).toNumber();
            }
            if (d.randomSeed != null) {
                m.randomSeed = d.randomSeed | 0;
            }
            if (d.unitInfos) {
                if (!Array.isArray(d.unitInfos))
                    throw TypeError(".Game.lock_step_fight_start_s2c.unitInfos: array expected");
                m.unitInfos = [];
                for (var i = 0; i < d.unitInfos.length; ++i) {
                    if (typeof d.unitInfos[i] !== "object")
                        throw TypeError(".Game.lock_step_fight_start_s2c.unitInfos: object expected");
                    m.unitInfos[i] = $root.Game.p_lock_step_unit_info.fromObject(d.unitInfos[i]);
                }
            }
            return m;
        };

        lock_step_fight_start_s2c.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.arrays || o.defaults) {
                d.unitInfos = [];
            }
            if (o.defaults) {
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.startTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.startTime = o.longs === String ? "0" : 0;
                d.randomSeed = 0;
            }
            if (m.startTime != null && m.hasOwnProperty("startTime")) {
                if (typeof m.startTime === "number")
                    d.startTime = o.longs === String ? String(m.startTime) : m.startTime;
                else
                    d.startTime = o.longs === String ? $util.Long.prototype.toString.call(m.startTime) : o.longs === Number ? new $util.LongBits(m.startTime.low >>> 0, m.startTime.high >>> 0).toNumber() : m.startTime;
            }
            if (m.randomSeed != null && m.hasOwnProperty("randomSeed")) {
                d.randomSeed = m.randomSeed;
            }
            if (m.unitInfos && m.unitInfos.length) {
                d.unitInfos = [];
                for (var j = 0; j < m.unitInfos.length; ++j) {
                    d.unitInfos[j] = $root.Game.p_lock_step_unit_info.toObject(m.unitInfos[j], o);
                }
            }
            return d;
        };

        lock_step_fight_start_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_fight_start_s2c;
    })();

    Game.lock_step_frame_message_c2s = (function() {

        function lock_step_frame_message_c2s(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_frame_message_c2s.prototype.frame = 0;
        lock_step_frame_message_c2s.prototype.input = null;

        lock_step_frame_message_c2s.create = function create(properties) {
            return new lock_step_frame_message_c2s(properties);
        };

        lock_step_frame_message_c2s.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.frame != null && Object.hasOwnProperty.call(m, "frame"))
                w.uint32(8).int32(m.frame);
            if (m.input != null && Object.hasOwnProperty.call(m, "input"))
                $root.Game.p_ls_input.encode(m.input, w.uint32(18).fork()).ldelim();
            return w;
        };

        lock_step_frame_message_c2s.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_frame_message_c2s();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.frame = r.int32();
                    break;
                case 2:
                    m.input = $root.Game.p_ls_input.decode(r, r.uint32());
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_frame_message_c2s.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_frame_message_c2s)
                return d;
            var m = new $root.Game.lock_step_frame_message_c2s();
            if (d.frame != null) {
                m.frame = d.frame | 0;
            }
            if (d.input != null) {
                if (typeof d.input !== "object")
                    throw TypeError(".Game.lock_step_frame_message_c2s.input: object expected");
                m.input = $root.Game.p_ls_input.fromObject(d.input);
            }
            return m;
        };

        lock_step_frame_message_c2s.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                d.frame = 0;
                d.input = null;
            }
            if (m.frame != null && m.hasOwnProperty("frame")) {
                d.frame = m.frame;
            }
            if (m.input != null && m.hasOwnProperty("input")) {
                d.input = $root.Game.p_ls_input.toObject(m.input, o);
            }
            return d;
        };

        lock_step_frame_message_c2s.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_frame_message_c2s;
    })();

    Game.lock_step_one_frame_inputs_s2c = (function() {

        function lock_step_one_frame_inputs_s2c(p) {
            this.inputs = [];
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_one_frame_inputs_s2c.prototype.inputs = $util.emptyArray;

        lock_step_one_frame_inputs_s2c.create = function create(properties) {
            return new lock_step_one_frame_inputs_s2c(properties);
        };

        lock_step_one_frame_inputs_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.inputs != null && m.inputs.length) {
                for (var i = 0; i < m.inputs.length; ++i)
                    $root.Game.p_one_frame_input.encode(m.inputs[i], w.uint32(10).fork()).ldelim();
            }
            return w;
        };

        lock_step_one_frame_inputs_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_one_frame_inputs_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    if (!(m.inputs && m.inputs.length))
                        m.inputs = [];
                    m.inputs.push($root.Game.p_one_frame_input.decode(r, r.uint32()));
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_one_frame_inputs_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_one_frame_inputs_s2c)
                return d;
            var m = new $root.Game.lock_step_one_frame_inputs_s2c();
            if (d.inputs) {
                if (!Array.isArray(d.inputs))
                    throw TypeError(".Game.lock_step_one_frame_inputs_s2c.inputs: array expected");
                m.inputs = [];
                for (var i = 0; i < d.inputs.length; ++i) {
                    if (typeof d.inputs[i] !== "object")
                        throw TypeError(".Game.lock_step_one_frame_inputs_s2c.inputs: object expected");
                    m.inputs[i] = $root.Game.p_one_frame_input.fromObject(d.inputs[i]);
                }
            }
            return m;
        };

        lock_step_one_frame_inputs_s2c.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.arrays || o.defaults) {
                d.inputs = [];
            }
            if (m.inputs && m.inputs.length) {
                d.inputs = [];
                for (var j = 0; j < m.inputs.length; ++j) {
                    d.inputs[j] = $root.Game.p_one_frame_input.toObject(m.inputs[j], o);
                }
            }
            return d;
        };

        lock_step_one_frame_inputs_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_one_frame_inputs_s2c;
    })();

    Game.lock_step_adjust_update_time_s2c = (function() {

        function lock_step_adjust_update_time_s2c(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_adjust_update_time_s2c.prototype.diffTime = 0;

        lock_step_adjust_update_time_s2c.create = function create(properties) {
            return new lock_step_adjust_update_time_s2c(properties);
        };

        lock_step_adjust_update_time_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.diffTime != null && Object.hasOwnProperty.call(m, "diffTime"))
                w.uint32(8).int32(m.diffTime);
            return w;
        };

        lock_step_adjust_update_time_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_adjust_update_time_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.diffTime = r.int32();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_adjust_update_time_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_adjust_update_time_s2c)
                return d;
            var m = new $root.Game.lock_step_adjust_update_time_s2c();
            if (d.diffTime != null) {
                m.diffTime = d.diffTime | 0;
            }
            return m;
        };

        lock_step_adjust_update_time_s2c.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                d.diffTime = 0;
            }
            if (m.diffTime != null && m.hasOwnProperty("diffTime")) {
                d.diffTime = m.diffTime;
            }
            return d;
        };

        lock_step_adjust_update_time_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_adjust_update_time_s2c;
    })();

    Game.lock_step_check_hash_c2s = (function() {

        function lock_step_check_hash_c2s(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_check_hash_c2s.prototype.frame = 0;
        lock_step_check_hash_c2s.prototype.hash = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        lock_step_check_hash_c2s.create = function create(properties) {
            return new lock_step_check_hash_c2s(properties);
        };

        lock_step_check_hash_c2s.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.frame != null && Object.hasOwnProperty.call(m, "frame"))
                w.uint32(8).int32(m.frame);
            if (m.hash != null && Object.hasOwnProperty.call(m, "hash"))
                w.uint32(16).int64(m.hash);
            return w;
        };

        lock_step_check_hash_c2s.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_check_hash_c2s();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.frame = r.int32();
                    break;
                case 2:
                    m.hash = r.int64();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_check_hash_c2s.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_check_hash_c2s)
                return d;
            var m = new $root.Game.lock_step_check_hash_c2s();
            if (d.frame != null) {
                m.frame = d.frame | 0;
            }
            if (d.hash != null) {
                if ($util.Long)
                    (m.hash = $util.Long.fromValue(d.hash)).unsigned = false;
                else if (typeof d.hash === "string")
                    m.hash = parseInt(d.hash, 10);
                else if (typeof d.hash === "number")
                    m.hash = d.hash;
                else if (typeof d.hash === "object")
                    m.hash = new $util.LongBits(d.hash.low >>> 0, d.hash.high >>> 0).toNumber();
            }
            return m;
        };

        lock_step_check_hash_c2s.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.defaults) {
                d.frame = 0;
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.hash = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.hash = o.longs === String ? "0" : 0;
            }
            if (m.frame != null && m.hasOwnProperty("frame")) {
                d.frame = m.frame;
            }
            if (m.hash != null && m.hasOwnProperty("hash")) {
                if (typeof m.hash === "number")
                    d.hash = o.longs === String ? String(m.hash) : m.hash;
                else
                    d.hash = o.longs === String ? $util.Long.prototype.toString.call(m.hash) : o.longs === Number ? new $util.LongBits(m.hash.low >>> 0, m.hash.high >>> 0).toNumber() : m.hash;
            }
            return d;
        };

        lock_step_check_hash_c2s.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_check_hash_c2s;
    })();

    Game.lock_step_check_hash_s2c = (function() {

        function lock_step_check_hash_s2c(p) {
            this.unitInfos = [];
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_check_hash_s2c.prototype.frame = 0;
        lock_step_check_hash_s2c.prototype.unitInfos = $util.emptyArray;
        lock_step_check_hash_s2c.prototype.code = 0;

        lock_step_check_hash_s2c.create = function create(properties) {
            return new lock_step_check_hash_s2c(properties);
        };

        lock_step_check_hash_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.frame != null && Object.hasOwnProperty.call(m, "frame"))
                w.uint32(8).int32(m.frame);
            if (m.unitInfos != null && m.unitInfos.length) {
                for (var i = 0; i < m.unitInfos.length; ++i)
                    $root.Game.p_lock_step_unit_info.encode(m.unitInfos[i], w.uint32(18).fork()).ldelim();
            }
            if (m.code != null && Object.hasOwnProperty.call(m, "code"))
                w.uint32(24).uint32(m.code);
            return w;
        };

        lock_step_check_hash_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_check_hash_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.frame = r.int32();
                    break;
                case 2:
                    if (!(m.unitInfos && m.unitInfos.length))
                        m.unitInfos = [];
                    m.unitInfos.push($root.Game.p_lock_step_unit_info.decode(r, r.uint32()));
                    break;
                case 3:
                    m.code = r.uint32();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_check_hash_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_check_hash_s2c)
                return d;
            var m = new $root.Game.lock_step_check_hash_s2c();
            if (d.frame != null) {
                m.frame = d.frame | 0;
            }
            if (d.unitInfos) {
                if (!Array.isArray(d.unitInfos))
                    throw TypeError(".Game.lock_step_check_hash_s2c.unitInfos: array expected");
                m.unitInfos = [];
                for (var i = 0; i < d.unitInfos.length; ++i) {
                    if (typeof d.unitInfos[i] !== "object")
                        throw TypeError(".Game.lock_step_check_hash_s2c.unitInfos: object expected");
                    m.unitInfos[i] = $root.Game.p_lock_step_unit_info.fromObject(d.unitInfos[i]);
                }
            }
            if (d.code != null) {
                m.code = d.code >>> 0;
            }
            return m;
        };

        lock_step_check_hash_s2c.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.arrays || o.defaults) {
                d.unitInfos = [];
            }
            if (o.defaults) {
                d.frame = 0;
                d.code = 0;
            }
            if (m.frame != null && m.hasOwnProperty("frame")) {
                d.frame = m.frame;
            }
            if (m.unitInfos && m.unitInfos.length) {
                d.unitInfos = [];
                for (var j = 0; j < m.unitInfos.length; ++j) {
                    d.unitInfos[j] = $root.Game.p_lock_step_unit_info.toObject(m.unitInfos[j], o);
                }
            }
            if (m.code != null && m.hasOwnProperty("code")) {
                d.code = m.code;
            }
            return d;
        };

        lock_step_check_hash_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_check_hash_s2c;
    })();

    Game.lock_step_reconnect_c2s = (function() {

        function lock_step_reconnect_c2s(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_reconnect_c2s.create = function create(properties) {
            return new lock_step_reconnect_c2s(properties);
        };

        lock_step_reconnect_c2s.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            return w;
        };

        lock_step_reconnect_c2s.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_reconnect_c2s();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_reconnect_c2s.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_reconnect_c2s)
                return d;
            return new $root.Game.lock_step_reconnect_c2s();
        };

        lock_step_reconnect_c2s.toObject = function toObject() {
            return {};
        };

        lock_step_reconnect_c2s.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_reconnect_c2s;
    })();

    Game.lock_step_reconnect_s2c = (function() {

        function lock_step_reconnect_s2c(p) {
            this.unitInfos = [];
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_reconnect_s2c.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
        lock_step_reconnect_s2c.prototype.unitInfos = $util.emptyArray;
        lock_step_reconnect_s2c.prototype.frame = 0;

        lock_step_reconnect_s2c.create = function create(properties) {
            return new lock_step_reconnect_s2c(properties);
        };

        lock_step_reconnect_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.startTime != null && Object.hasOwnProperty.call(m, "startTime"))
                w.uint32(8).int64(m.startTime);
            if (m.unitInfos != null && m.unitInfos.length) {
                for (var i = 0; i < m.unitInfos.length; ++i)
                    $root.Game.p_lock_step_unit_info.encode(m.unitInfos[i], w.uint32(18).fork()).ldelim();
            }
            if (m.frame != null && Object.hasOwnProperty.call(m, "frame"))
                w.uint32(24).int32(m.frame);
            return w;
        };

        lock_step_reconnect_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_reconnect_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.startTime = r.int64();
                    break;
                case 2:
                    if (!(m.unitInfos && m.unitInfos.length))
                        m.unitInfos = [];
                    m.unitInfos.push($root.Game.p_lock_step_unit_info.decode(r, r.uint32()));
                    break;
                case 3:
                    m.frame = r.int32();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_reconnect_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_reconnect_s2c)
                return d;
            var m = new $root.Game.lock_step_reconnect_s2c();
            if (d.startTime != null) {
                if ($util.Long)
                    (m.startTime = $util.Long.fromValue(d.startTime)).unsigned = false;
                else if (typeof d.startTime === "string")
                    m.startTime = parseInt(d.startTime, 10);
                else if (typeof d.startTime === "number")
                    m.startTime = d.startTime;
                else if (typeof d.startTime === "object")
                    m.startTime = new $util.LongBits(d.startTime.low >>> 0, d.startTime.high >>> 0).toNumber();
            }
            if (d.unitInfos) {
                if (!Array.isArray(d.unitInfos))
                    throw TypeError(".Game.lock_step_reconnect_s2c.unitInfos: array expected");
                m.unitInfos = [];
                for (var i = 0; i < d.unitInfos.length; ++i) {
                    if (typeof d.unitInfos[i] !== "object")
                        throw TypeError(".Game.lock_step_reconnect_s2c.unitInfos: object expected");
                    m.unitInfos[i] = $root.Game.p_lock_step_unit_info.fromObject(d.unitInfos[i]);
                }
            }
            if (d.frame != null) {
                m.frame = d.frame | 0;
            }
            return m;
        };

        lock_step_reconnect_s2c.toObject = function toObject(m, o) {
            if (!o)
                o = {};
            var d = {};
            if (o.arrays || o.defaults) {
                d.unitInfos = [];
            }
            if (o.defaults) {
                if ($util.Long) {
                    var n = new $util.Long(0, 0, false);
                    d.startTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                } else
                    d.startTime = o.longs === String ? "0" : 0;
                d.frame = 0;
            }
            if (m.startTime != null && m.hasOwnProperty("startTime")) {
                if (typeof m.startTime === "number")
                    d.startTime = o.longs === String ? String(m.startTime) : m.startTime;
                else
                    d.startTime = o.longs === String ? $util.Long.prototype.toString.call(m.startTime) : o.longs === Number ? new $util.LongBits(m.startTime.low >>> 0, m.startTime.high >>> 0).toNumber() : m.startTime;
            }
            if (m.unitInfos && m.unitInfos.length) {
                d.unitInfos = [];
                for (var j = 0; j < m.unitInfos.length; ++j) {
                    d.unitInfos[j] = $root.Game.p_lock_step_unit_info.toObject(m.unitInfos[j], o);
                }
            }
            if (m.frame != null && m.hasOwnProperty("frame")) {
                d.frame = m.frame;
            }
            return d;
        };

        lock_step_reconnect_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_reconnect_s2c;
    })();

    Game.lock_step_match_fail_s2c = (function() {

        function lock_step_match_fail_s2c(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        lock_step_match_fail_s2c.create = function create(properties) {
            return new lock_step_match_fail_s2c(properties);
        };

        lock_step_match_fail_s2c.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            return w;
        };

        lock_step_match_fail_s2c.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.Game.lock_step_match_fail_s2c();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        lock_step_match_fail_s2c.fromObject = function fromObject(d) {
            if (d instanceof $root.Game.lock_step_match_fail_s2c)
                return d;
            return new $root.Game.lock_step_match_fail_s2c();
        };

        lock_step_match_fail_s2c.toObject = function toObject() {
            return {};
        };

        lock_step_match_fail_s2c.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.default.util.toJSONOptions);
        };

        return lock_step_match_fail_s2c;
    })();

    return Game;
})();

export { $root as default };
